
<form class="well form-horizontal span8" action="<?php echo base_url() . "admin.php/materia/ingresodatos" ?>" method="post">
    <legend>CREAR DATOS DE LAS MATERIAS </legend>


    <div class="control-group">
        <label class="control-label" for="select03">CARRERAS</label>
        <div class="controls ">
            <select name="carrera" class="span3"
                    ONCHANGE="javascript:enviar(this.options[this.selectedIndex].value, '<?php echo (base_url()) . "admin.php/materia/crear" ?>');">
                        <?php
                        if ($ide_car == -1)
                            echo ("<option value='-1' selected>Seleccionar Carrera</option>");
                        foreach ($carrera as $i => $car) {
                            echo ("<option value='" . $car["ide_car"] . "'");
                            echo (($ide_car == $car["ide_car"] ? " selected" : "") . ">");
                            echo ($car["nombre_car"] . "</option>");
                        }
                        ?>
            </select>
            <?php if (isset($msj_error)) { ?>
                <div class='MensajeError'>
                    <?php echo ($msj_error); ?>
                </div>
            <?php } ?>

        </div>
    </div>

    <div class="control-group">
        <label class="control-label" for="select03">Malla Curricular</label>
        <div class="controls ">
            <select id="select02" name="pensum" class="span3"
                    ONCHANGE="javascript:enviar1('<?php echo (base_url()) . "admin.php/materia/crear" ?>',
                                    '<?php echo $ide_car ?>', this.options[this.selectedIndex].value);">

                <?php
                if ($ide_pen == -1)
                    echo ("<option value='-1' selected>Seleccionar Pensum</option>");

                foreach ($pensum as $i => $pen) {
                    echo ("<option value='" . $pen["ide_pen"] . "'>");
                    echo ($pen["descripcion_pen"] . "-" . $pen["estado_pen"] . "</option>");
                }
                ?>

            </select>
            <?php if (isset($msj_error1)) { ?>
                <div class='MensajeError'>
                    <?php echo ($msj_error1); ?>
                </div>
            <?php } ?>
        </div>
    </div>
    <div class="control-group">
        <label class="control-label" for="select04">Lista de Semestres</label>
        <div class="controls ">
            <select id="select01"  name="ciclo" class="span3">
                <?php
                if ($ide_pen == -1)
                    echo ("<option value='-1' selected>Seleccionar Semestre</option>");
                else
                    foreach ($ciclo as $i => $cic) {
                        echo ("<option value='" . $cic["ide_cic"] . "'>");
                        echo ($cic["codigo_cic"] . "-" . $cic["nombre_cic"] . "</option>");
                    }
                ?>

            </select>
        </div>
    </div>


    <div class="control-group">
        <label class="control-label" for="select05">Eje de Formaci&oacute;on</label>
        <div class="controls ">
            <select id="select01"  name="ejeform_mat" class="span2">
                <option value="1">HUMINISTICA</option>
                <option value="2">BASICA</option>
                <option value="3">PROFESIONAL</option>
                <option value="4">OPTATIVA</option>

            </select>
        </div>
    </div>

    <div class="control-group">
        <label class="control-label" for="select06">Campo de la Ciencia</label>
        <div class="controls ">
            <select id="select01"  name="campocien_mat" class="span3">
                <option value="11">LOGICA</option>
                <option value="12">MATEMATICAS</option>
                <option value="22">FISICA</option>
                <option value="23">QUIMICA</option>
                <option value="24">CIENCIAS DE LA VIDA</option>
                <option value="33">CIENCIAS TECNOLOGICAS</option>
                <option value="53">CIENCIAS ECONOMICAS</option>
                <option value="57">LINGUISTICA</option>
                <option value="71">ETICA</option>

            </select>
        </div>
    </div>
    <div class="control-group">
        <label class="control-label" for="input03">C&oacute;digo de Materia</label>
        <div class="controls">
            <input type="text" class="input-medium span1"  name="codigo_mat" value="<?php echo set_value('codigo_mat'); ?>">
            <li class="icon-asterisk"></li>
            <div class='MensajeError'>
                <?php echo form_error('codigo_mat') ?>
            </div>

        </div>
    </div>

    <div class="control-group">
        <label class="control-label" for="input03">Nombre de Materia</label>
        <div class="controls">
            <input type="text" class="input-medium span3"  name="nombre_mat" value="<?php echo set_value('nombre_mat'); ?>">
            <li class="icon-asterisk"></li>
            <div class='MensajeError'>
                <?php echo form_error('nombre_mat') ?>
            </div>

        </div>
    </div>
    <div class="control-group">
        <label class="control-label" for="select07">Cr&eacute;ditos</label>
        <div class="controls ">
            <select id="select01"  name="creditos_mat" class="span3">
                <option value='1'>UNO</option>
                <option value='2'>DOS</option>
                <option value='3'>TRES</option>
                <option value='4'>CUATRO</option>
                <option value='5'>CINCO</option>
                <option value='6'>SEIS</option>
                <option value='7'>SIETE</option>
                <option value='8'>OCHO</option>

            </select>
        </div>
    </div>
    <div class="control-group">
        <label class="control-label" for="select08">Tipo Materia</label>
        <div class="controls ">
            <select id="select01"  name="tipomat_mat" class="span3">
                <option>TEORICA</option>
                <option >PRACTICA</option>
            </select>
        </div>
    </div>
    <div class="control-group">
        <label class="control-label" for="select09">Prerequisito1</label>
        <div class="controls ">
            <select id="select01"  name="requisito1_mat" class="span3">
                <?php
                echo ("<option value='0' selected>NINGUNA</option>");
                if ($ide_pen != -1) {
                    foreach ($requisitos as $i => $req) {
                        echo ("<option value='" . $req["ide_mat"] . "'>");
                        echo ($req["codigo_cic"] . "-" . $req["nombre_mat"] . "</option>");
                    }
                }
                ?>

            </select>
        </div>
    </div>
    <div class="control-group">
        <label class="control-label" for="select10">Prerequisito2</label>
        <div class="controls ">
            <select id="select01"  name="requisito2_mat" class="span3">
                <?php
                echo ("<option value='0' selected>NINGUNA</option>");
                if ($ide_pen != -1) {
                    foreach ($requisitos as $i => $req) {
                        echo ("<option value='" . $req["ide_mat"] . "'>");
                        echo ($req["codigo_cic"] . "-" . $req["nombre_mat"] . "</option>");
                    }
                }
                ?>
            </select>
        </div>
    </div>

    <div class="control-group">
        <label class="control-label" for="select11">Prerequisito3</label>
        <div class="controls ">
            <select id="select01"  name="requisito3_mat" class="span3">
                <?php
                echo ("<option value='0' selected>NINGUNA</option>");
                if ($ide_pen != -1) {
                    foreach ($requisitos as $i => $req) {
                        echo ("<option value='" . $req["ide_mat"] . "'>");
                        echo ($req["codigo_cic"] . "-" . $req["nombre_mat"] . "</option>");
                    }
                }
                ?>


            </select>
        </div>
    </div>
    <div class="control-group">
        <label class="control-label" for="select12">Prerequisito4</label>
        <div class="controls ">
            <select id="select01"  name="requisito4_mat" class="span3">
                <?php
                echo ("<option value='0' selected>NINGUNA</option>");
                if ($ide_pen != -1) {
                    foreach ($requisitos as $i => $req) {
                        echo ("<option value='" . $req["ide_mat"] . "'>");
                        echo ($req["codigo_cic"] . "-" . $req["nombre_mat"] . "</option>");
                    }
                }
                ?>

            </select>
        </div>
    </div>


    <div class="controls">
        <button type="submit" class="btn">Grabar Datos</button>
        <a href="<?php echo base_url() . "admin.php/materia/inicio" ?>">
            <img src="<?php echo base_url(); ?>commons/images/boton_volver.gif"></a>
    </div>



</form>

